package com.product.system.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import com.product.system.domain.Condition;
import com.product.system.domain.LoginName;
import com.product.system.domain.User;
import com.product.system.domain.UserBarChart;
import com.product.system.mapper.UserMapper;
import com.product.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;
//    @Override
//    public List<User> listUser(User user) {//Condition condition,
//
//        List<User> list= userMapper.listUser(user);
//        return list;
//    }

    @Override
    public void addUser(User user) {
        userMapper.addUser(user);
    }

    @Override
    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    @Override
    public User loginOrName(LoginName loginName) {
        return userMapper.loginOrName(loginName);
    }

    @Override
    public int byUserId(Integer id) {
        return userMapper.byUserId(id);
    }

    @Override
    public List<User> getExcelUser() {
        return userMapper.getExcelUser();
    }

    @Override
    public List<User> listAll() {
        return userMapper.listAll();
    }

    @Override
    public List<UserBarChart> barChartList() {
        return userMapper.barChartList();
    }

    @Override
    public List<User> getList() {
        return userMapper.getList();
    }
}
